﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;


public partial class ResultatenOpdrachten : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!User.IsInRole("Admin"))
        {
            Response.Redirect("Default.aspx");
        }
        //DataSet1TableAdapters.LeerlingOpdrachtDetailTableAdapter leerlingOpdrachtTableAdapter;
        //DataTable dt = leerlingOpdrachtTableAdapter.get
        //dt.Columns["opdrachtID"].ColumnMapping = MappingType.Hidden;
        ////dt.Columns["leerlingID"].ColumnMapping = MappingType.Hidden;
        //dt.Columns["leerlingOpdrachtID"].ColumnMapping = MappingType.Hidden;
        //GridView1.DataSource = dt;
    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {
            GridView temp = (GridView)sender;
            Response.Redirect("/OefeningenWebsite/ResultatenOpdrachten.aspx?opID=" + Request.QueryString["opID"] + "&llnID=" + temp.SelectedRow.Cells[1].Text);
            //int llnid = Int32.Parse(GridView1.SelectedRow.Cells[0].ToString());

            //DataTable dt2 = null;
            //try
            //{
            //    dt2 = leerlingOpdrachtTableAdapter.GetAntwoorden(currentOpdrachtID, llnid);
            //}
            //catch (Exception)
            //{
            //}

            //dt2.Columns["opdrachtID"].ColumnMapping = MappingType.Hidden;
            //dt2.Columns["leerlingID"].ColumnMapping = MappingType.Hidden;
            //dt2.Columns["leerlingOpdrachtID"].ColumnMapping = MappingType.Hidden;
            //dt2.Columns["leerlingOpdrachtDetailID"].ColumnMapping = MappingType.Hidden;
            //dt2.Columns["opdrachtDetailID"].ColumnMapping = MappingType.Hidden;
            ////dt2.Columns["maxScore"].ColumnMapping = MappingType.Hidden;

            //GridView2.DataSource = dt2;


        
    }
}
